package gov.pbc.nn.kjgl.maintenance.usb.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import com.bstek.dorado.annotation.PropertyDef;

/**
 * common_user_usbkey:
 */
//@Entity
//@Table(name = "common_user_usbkey")
public class CommonUserUsbkey implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 编号:编号
	 */
	@PropertyDef(label = "编号", description = "编号:编号")
	private int id;

	/**
	 * 用户ID:用户ID
	 */
	@PropertyDef(label = "用户ID", description = "用户ID:用户ID")
	private String username;

	/**
	 * 用户名:用户名
	 */
	@PropertyDef(label = "用户名", description = "用户名:用户名")
	private String cname;

	/**
	 * Usbkey编号:Usbkey编号
	 */
	@PropertyDef(label = "Usbkey编号", description = "Usbkey编号:Usbkey编号")
	private String usbkeyId;

	/**
	 * 证书编号:证书编号
	 */
	@PropertyDef(label = "证书编号", description = "证书编号:证书编号")
	private String certId;

	/**
	 * 绑定时间:绑定时间
	 */
	@PropertyDef(label = "绑定时间", description = "绑定时间:绑定时间")
	private Date bindingDate;

	public CommonUserUsbkey() {
		super();
	}

	public CommonUserUsbkey(int id, String username, String cname,
			String usbkeyId, String certId, Date bindingDate) {
		super();
		this.id = id;
		this.username = username;
		this.cname = cname;
		this.usbkeyId = usbkeyId;
		this.certId = certId;
		this.bindingDate = bindingDate;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", nullable = false)
	public int getId() {
		return id;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "Username", length = 255)
	public String getUsername() {
		return username;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@Column(name = "Cname", length = 255)
	public String getCname() {
		return cname;
	}

	public void setUsbkeyId(String usbkeyId) {
		this.usbkeyId = usbkeyId;
	}

	@Column(name = "Usbkey_Id", length = 255)
	public String getUsbkeyId() {
		return usbkeyId;
	}

	public void setCertId(String certId) {
		this.certId = certId;
	}

	@Column(name = "Cert_Id", length = 255)
	public String getCertId() {
		return certId;
	}

	public void setBindingDate(Date bindingDate) {
		this.bindingDate = bindingDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "Binding_Date")
	public Date getBindingDate() {
		return bindingDate;
	}

	public String toString() {
		return "CommonUserUsbkey [id=" + id + ",username=" + username
				+ ",cname=" + cname + ",usbkeyId=" + usbkeyId + ",certId="
				+ certId + ",bindingDate=" + bindingDate + "]";
	}

}
